-- GENERATED SPELL FOR [Illidari Shadowstalker] --


function spell0_21337(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(7159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21337', 652, 1)
end

function spell1_21337(pUnit, Event) --@Shadowstalker Stealth,Self--
pUnit:FullCastSpellOnTarget(5916,pUnit)
pUnit:RegisterEvent('Sorts_21337', 600, 1)
end

function Sorts_21337(pUnit, Event)
local choix_sorts_21337 = math.random(0, 1)
if choix_sorts_21337 == 0 then
pUnit:RegisterEvent('spell0_21337', 1, 1)
end
if choix_sorts_21337 == 1 then
pUnit:RegisterEvent('spell1_21337', 1, 1)
end
end

function mob21337_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21337', math.random(1500, 3000), 1)
end

function mob21337_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21337_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21337_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21337, 1, 'mob21337_Action')
RegisterUnitEvent(21337, 2, 'mob21337_Leave')
RegisterUnitEvent(21337, 3, 'mob21337_Kill')
RegisterUnitEvent(21337, 4, 'mob21337_Die')
